import { combineReducers } from 'redux'
const modulesFiles = import.meta.globEager('./modules/*.js')

const modules = Object.keys(modulesFiles).reduce((prev, cur) => {
  const key = cur.replace(/\.\/modules\/|\.js/g, '')
  prev[key] = modulesFiles[cur].default
  return prev
}, {})


export default combineReducers(modules)
